package com.simcpux;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.common.sp.PaySp;
import com.orangelife.mobile.util.LogE;
import com.tencent.mm.sdk.openapi.IWXAPI;
import com.tencent.mm.sdk.openapi.WXAPIFactory;

public class AppRegister extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        //这里需要传入APP_ID
        String appID = PaySp.getWxAppID();
        final IWXAPI api = WXAPIFactory.createWXAPI(context, appID);
        api.registerApp(appID);
        LogE.E("WeiXinPay AppRegister(BroadcastReceiver) appID=" + appID);
    }
}
